package cn.wolfcode.trip.base.domain;

import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.Date;
@Getter
@Setter
public class Mycomment extends BaseDomain{

    public static final int NEWS=0;
    public static final int COMMENT=1;


    private  User user;

    private String comment;

    private Article article;

    private Integer typestatus;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date commendtime;

    public String getStatusName(){
        if(typestatus==0){
            return "日报";
        }else if (typestatus==2){
            return "攻略";
        }
            return "文章";
    }

}